#pragma once

class Huffman;

void getFreqTable(string file);
int vaildSymbom();
void initPQ(int n, PQ &pq);
nodeType *huffman(int n, PQ &pq);
void addCode(char symbol, unsigned int currCode, int currLen, ofstream &outFile);
void makeCode(nodeType *p, unsigned int currCode, int currLen, ofstream &outFile);
void encodeText(string file, string compFile);

int readHuffman();
Huffman *findCode(char ch, int huffNum);

void deCording();
bool findHuffmanCode(unsigned int code,int huffNum, Huffman **huffmanTemp);